#include<iostream>
using namespace std;
template <class realtype,int size> class rtype{
realtype a[size];
public:
rtype()
{
 int i;
}
realtype &operator[](int i);
};
template <class realtype,int size>
realtype &rtype<realtype,size>::operator[](int i)
{if(i<0||i>size-1)
{
cout<<"\nindex value of ";
cout<<i<<"is out of bound.n";
}
return a[i];
}
int main()
{
rtype<int,3> iob;
rtype<double,6>  rob;
int i,l=0;
float k=1.0;
cout<<"integerarray";
for(i=0;i<3;i++)
{
cin>>iob[i];
}
for(i=0;i<3;i++)
{
l=iob[i]+l;
}
cout<<l<<" ";
cout<<"realarray";
for(i=0;i<6;i++)
{
cin>>rob[i];
}
for(i=0;i<6;i++)
{
k=k*rob[i];
}
cout<<k;
return 0;
}


